package org.enhance.common.util;

public class Detect {
	private Detect() {
		throw new IllegalStateException("Constant class");
	}

	public static boolean isNegative(short value) {
		return value < 0;
	}

	public static boolean isNegative(int value) {
		return value < 0;
	}

	public static boolean isNegative(Byte value) {
		return value != null && value < 0;
	}

	public static boolean isNegative(Long value) {
		return value == null || value < 0;
	}

	public static boolean isNegative(float value) {
		return value < 0;
	}

	public static boolean isNegative(double value) {
		return value < 0;
	}

	public static boolean isPositive(Long value) {
		return value != null && value > 0;
	}

	public static boolean isPositive(float value) {
		return value > 0;
	}

	public static boolean isPositive(short value) {
		return value > 0;
	}

	public static boolean isPositive(Byte value) {
		return value != null && value > 0;
	}

	public static boolean isPositive(Integer value) {
		return value != null && value > 0;
	}

	public static boolean isPositive(Double value) {
		return value != null && value > 0;
	}

	public static boolean isFalse(Boolean value) {
		return value == null ? true : !value;
	}

	public static boolean isTrue(Boolean value) {
		return value == null ? false : value;
	}
}
